package com.hzspace.elasticsearch.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "product")
public class Product {

    @Id
    private Integer id;

    @Field(analyzer = "ik_smart", type = FieldType.Text)
    private String name;

    @Field(analyzer = "ik_smart", type = FieldType.Text)
    private String tag;

}
